package com.zqs.compareface.server.local;

import com.zqs.compareface.utils.impl.LocalCheckUtil;
import com.zqs.compareface.utils.impl.threadpool.TheCustomDynamicThreadPoolUtil;
import org.opencv.core.Mat;

import java.util.concurrent.Future;
import java.util.concurrent.ThreadPoolExecutor;

/**
 * @program: FaceCompares
 * @description:
 * @author: ZQS
 * @create: 2021-08-14 15:56
 */
public class ThreadPoolAdministrator implements Runnable{
    private Mat mat;

    public ThreadPoolAdministrator(Mat mat) {
        this.mat = mat;
    }
/*    ThreadPoolExecutor executor;
    {
        try {
            executor = TheCustomDynamicThreadPoolUtil.usedynamicModifyExecutor();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }*/
    @Override
    public void run() {
/*        Future future = executor.submit(() -> {
            LocalCheckUtil localCheckUtil = new LocalCheckUtil();
            localCheckUtil.getFace2(mat);
            if (localCheckUtil.getFaceimage() != null) {
                Mat faceimage = localCheckUtil.getFaceimage();
                new FaceImageContrast().contrast(faceimage);
            }
            TheCustomDynamicThreadPoolUtil.threadPoolStatus(executor, "线程池状态");
                }
        );
        try {
            future.get();
        } catch (Exception e) {
            e.printStackTrace();
        }*/


    }
}
